<template>
  <!-- 我的询价 -->
  <view class="wrap-box">
    <!--    tab切换菜单-->
    <view class="choose-group">
      <view
        :class="item.checked == true ? 'li active' : 'li'"
        v-for="(item, index) in dataList"
        :key="index"
        @tap="chooseSelector(index)"
      >
        <view class="name">
          {{ item.name }}
        </view>
      </view>
    </view>

    <!-- 列表 -->
    <view class="looking-car" v-show="!showimg">
      <scroll-view scroll-y @scrolltolower="getList" class="scroll">
        <page-loading :show="pageLoading">
          <inquiry-list-card
            v-for="(item, index) in list"
            :key="index"
            :info="item"
          ></inquiry-list-card>
          <view v-show="showText" class="end">-- 已经到底了 --</view>
        </page-loading>
      </scroll-view>
    </view>

    <!-- 无内容默认图片 -->
    <view v-show="showimg">
      <defaultImg msg="暂无询价"></defaultImg>
    </view>

    <view class="btn-wrap">
      <button class="btn-primary" @click="newInquiry">发布询价</button>
    </view>

    <!--    弹窗-->
    <view>
      <u-modal
        :title="modalTitle"
        v-model="showModal"
        width="74%"
        :mask-close-able="true"
        :title-style="{
          fontWeight: 'bold',
          fontSize: '36rpx',
          color: '#333333',
        }"
        :show-confirm-button="false"
      >
        <view class="slot-content">
          <rich-text :nodes="modalText"></rich-text>
        </view>
        <view class="woxiangxbox">
          <view>
            <button class="slot-contentbutto2" @click="modalCancel">
              {{ modalBtnLeft }}
            </button>
          </view>
          <view>
            <button class="slot-contentbutto" @click="modalConfirme">
              {{ modalBtnRight }}
            </button>
          </view>
        </view>
      </u-modal>
    </view>
  </view>
</template>
<script src="./myInquiryList.js"></script>
<style lang="scss" scoped>
@import './myInquiryList.scss';
</style>
